#!/usr/bin/python

import os
import sys
import commands

files = os.listdir(".")

sys.argv.pop(0)
args = sys.argv
args = ' '.join(args)
cmd = 'git ' + args

for file in files:
	if os.path.isdir(file):
		if os.path.exists(os.path.join(file, ".git")) and not ((args.startswith('push') or args.startswith('commit')) and file == 'kodo' ):
			os.chdir(file)
			print "FOLDER: " + file
			print commands.getoutput(cmd)
			os.chdir('..')
